package cn.heygod.graywhale.modules.ipaas.service.impl;

import java.util.List;
import java.util.ArrayList;

import cn.heygod.graywhale.modules.ipaas.service.GwScriptService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import cn.heygod.graywhale.common.web.domain.request.PageDomain;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.heygod.graywhale.modules.ipaas.mapper.GwScriptMapper;
import cn.heygod.graywhale.modules.ipaas.domain.GwScript;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;

import java.util.Arrays;
/**
 * 脚本管理Service业务层处理
 *
 * @author simon
 * @date 2023-11-30
 */
@Service
public class GwScriptServiceImpl extends ServiceImpl<GwScriptMapper,GwScript> implements GwScriptService {


    /**
     * 查询脚本管理
     * @param gwScript 脚本管理
     * @param pageDomain
     * @return 脚本管理 分页集合
     * */
    @Override
    public PageInfo<GwScript> selectGwScriptPage(GwScript gwScript, PageDomain pageDomain) {
        PageHelper.startPage(pageDomain.getPage(), pageDomain.getLimit());
        List<GwScript> data = baseMapper.selectGwScriptList(gwScript);
        return new PageInfo<>(data);
    }

}